package com.qianli.cashmama.trade.client.trade.request;

import com.fqgj.common.api.ParamsObject;
import com.fqgj.exception.common.ApplicationException;
import org.apache.commons.lang.StringUtils;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2017/7/27
 * Time: 下午8:31
 */
public class RepayTradeRequest extends ParamsObject {

    /**
     * 交易编码
     */
    private String tradeNo;

    /**
     * 用户编码
     */
    private String userCode;

    /**
     * 银行名字
     */
    private String bankName;

    /**
     * 银行类型
     */
    private String bankType;
    /**
     * 签约手机号
     */
    private String signMobile;

    /**
     * 身份证号
     */
    private String identityNo;

    /**
     * 用户身份证名字
     */
    private String userName;

    /**
     * 银行卡号
     */
    private String cardNo;

    /**
     * 绑卡类型
     */
    private int bindType;


    @Override
    public void validate() {
        if (StringUtils.isEmpty(userCode)
                || StringUtils.isEmpty(bankName)
                || StringUtils.isEmpty(bankType)
                || StringUtils.isEmpty(cardNo)
                || StringUtils.isEmpty(tradeNo)) {
            throw new ApplicationException("Parameter error");
        }
    }

    public int getBindType() {
        return bindType;
    }

    public RepayTradeRequest setBindType(int bindType) {
        this.bindType = bindType;
        return this;
    }

    public String getIdentityNo() {
        return identityNo;
    }

    public RepayTradeRequest setIdentityNo(String identityNo) {
        this.identityNo = identityNo;
        return this;
    }

    public String getUserName() {
        return userName;
    }

    public RepayTradeRequest setUserName(String userName) {
        this.userName = userName;
        return this;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public RepayTradeRequest setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
        return this;
    }

    public String getUserCode() {
        return userCode;
    }

    public RepayTradeRequest setUserCode(String userCode) {
        this.userCode = userCode;
        return this;
    }

    public String getBankName() {
        return bankName;
    }

    public RepayTradeRequest setBankName(String bankName) {
        this.bankName = bankName;
        return this;
    }

    public String getBankType() {
        return bankType;
    }

    public RepayTradeRequest setBankType(String bankType) {
        this.bankType = bankType;
        return this;
    }

    public String getSignMobile() {
        return signMobile;
    }

    public RepayTradeRequest setSignMobile(String signMobile) {
        this.signMobile = signMobile;
        return this;
    }

    public String getCardNo() {
        return cardNo;
    }

    public RepayTradeRequest setCardNo(String cardNo) {
        this.cardNo = cardNo;
        return this;
    }
}
